package com.zjj.springstu.springHandwriting.app;

import com.zjj.springstu.springHandwriting.app.config.AppConfig;
import com.zjj.springstu.springHandwriting.app.service.UserService;
import com.zjj.springstu.springHandwriting.app.service.member.MemberService;
import com.zjj.springstu.springHandwriting.framework.context.ZjjAnnotationApplicationContext;

public class TestSpringHandWriting {
	public static void main(String[] args) {
		ZjjAnnotationApplicationContext applicationContext = new ZjjAnnotationApplicationContext(AppConfig.class);
		UserService userService = (UserService) applicationContext.getBean("userService1");
		userService.sayHi();
		System.out.println(userService.getAge());

		MemberService memberService1 = (MemberService) applicationContext.getBean("memberService");
		System.out.println(memberService1);
		MemberService memberService2 = (MemberService) applicationContext.getBean("memberService");
		System.out.println(memberService2);

	}
}
